package modbus.com.service.impl;

import modbus.com.domain.MeterCounterIot;
import modbus.com.mapper.MeterCounterIotMapper;
import modbus.com.service.MeterCounterIotService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 计米器采集(MeterCounterIot)表服务实现类
 *
 * @author makejava
 * @since 2024-10-23 10:01:06
 */
@Service("meterCounterIotService")
public class MeterCounterIotServiceImpl extends ServiceImpl<MeterCounterIotMapper, MeterCounterIot> implements MeterCounterIotService {
   @Resource
    private MeterCounterIotMapper mapper;
    @Override
    public List<MeterCounterIot> selectAll() {
        return mapper.selectList(null);
    }

    @Override
    public MeterCounterIot selectByPoint(int point) {
        QueryWrapper<MeterCounterIot> queryWrapper =new QueryWrapper<>();
        queryWrapper.eq("point",point);
        return mapper.selectOne(queryWrapper);
    }
}

